//
//  URLResponse.h
//  BaoZhangWang
//
//  Created by 叶越悦 on 15/10/14.
//  Copyright © 2015年 BaoliNetworkTechnology. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, URLResponseStatus) {
    URLResponseStatusSuccess, //作为底层，请求是否成功只考虑是否成功收到服务器反馈。至于签名是否正确，返回的数据是否完整，由上层的ApiBaseManager来决定。
    URLResponseStatusErrorHttpError
};

@interface URLResponse : NSObject

@property (nonatomic, readonly) NSInteger requestIdentifier;
@property (nonatomic, strong, readonly) NSURLRequest *request;
@property (nonatomic, readonly) URLResponseStatus status;

@property (nonatomic, strong, readonly) id responseObject;
@property (nonatomic, strong, readonly) NSURLResponse *response;
@property (nonatomic, strong, readonly) NSDictionary *responseHeader;

@property (nonatomic, strong, readonly) NSError *error; /**< 当错误的时候 */

@property (nonatomic, strong) id requestParams;

@end

NS_ASSUME_NONNULL_END
